import request from '@/utils/request'

// 获取权限列表
export const getPermissionList = (params) => request({
    url: '/sys/permission',
    method: 'GET',
    params
})

// 新增权限
export const addPermission = (data) => request({
    url: '/sys/permission',
    method: 'POST',
    data
})

// 更新权限
export const updatePermission = (data) => request({
    url: `/sys/permission/${data.id}`,
    method: 'PUT',
    data
})

// 删除权限
export const delPermission = (id) => request({
    url: `/sys/permission/${id}`,
    method: 'delete'
})

// 获取权限详细
export const getPermissionDetail = (id) => request({
    url: `/sys/permission/${id}`,
    method: 'GET'
})